﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Ict.DataAccess;
using CSF.BusinessCore.BLL;
using CSF.Customers.Data;
using CSF.Security.Data;

namespace CSF.Customers.BLL
{
    public class CustomerUserBLL : LogCreateLogic<CustomerUser>
    {
        internal List<UserAccount> GetUserByCustomer(int customerId)
        {
            var q = from p in DataContext.Select<UserAccount>()
                    join p1 in DataContext.Select<CustomerUser>() on p.Id equals p1.UserId 
                    where p1.CustomerId == customerId
                    select p;
            return q.ToList();
        }
    }
}
